<template>
  <main class="btn-list">
    <h3>Button 按钮</h3>
    <p>按钮。</p>
    <h4>代码演示</h4>
    <section class="sections-wrap">
      <section>
        <div class="demo-wrap">
          <Button>DEFAUIL</Button>
          <Button type="primary">PRIMARY</Button>
          <Button type="info">INFO</Button>
          <Button type="success">SUCCESS</Button>
          <Button type="warning">WARNING</Button>
          <Button type="error">ERROR</Button>
        </div>
        <div class="demo-footer">
          <span>基本</span>
          <p>最简单的用法，为您提供了6种基本的颜色。</p>
        </div>
      </section>

      <section>
        <div class="demo-wrap">
          <Button type="info" animation="raise">默认</Button>
          <Button type="info" animation="pulse">pulse</Button>
          <Button type="info" animation="fill">fill</Button>
          <Button type="info" animation="close">close</Button>
          <Button type="info" animation="slide"></Button>
          <Button type="info" animation="shake">shake</Button>
        </div>
        <div class="demo-footer">
          <span>动画</span>
          <p>最简单的用法，为您提供了5种基本的颜色。</p>
        </div>
      </section>
    </section>
  </main>
</template>

<script lang="ts">
import Button from "../lib/Button.vue";

import { ref } from "vue";
export default {
  name: "ButtonDemo",
  components: {
    // Button: ()=> import('../lib/Button.vue')
    Button,
  },
  setup() {},
};
</script>
<style lang="scss" scoped>
.btn-list {
  .sections-wrap {
    width: 100%;

    section {
      margin: 20px;
      border: 1px solid #f0f0f0;
      border-radius: 10px;
      box-shadow: 18px 18px 30px #d1d9e6, -18px -18px 30px #f0f0f0;
      .demo-footer {
        > p {
          letter-spacing: 1px;
          padding: 20px;
          font-size: 15px;
          color: rgba(0, 0, 0, 0.85);
        }
        > span {
          position: absolute;
          top: -12px;
          left: 20px;
          // width: 100%;
          padding: 0 10px;
          background-color: #fff;
          display: block;
        }
        border-top: 1px solid #f0f0f0;
        position: relative;
      }
      .demo-wrap {
        margin: 40px 20px;
        display: flex;
        align-items: center;
        justify-content: space-around;
      }
    }
  }
  h4 {
    color: rgba(0, 0, 0, 0.85);
    font-weight: 500;
    font-size: 24px;
  }
  h3 {
    color: rgba(0, 0, 0, 0.85);
    font-weight: 500;
    font-size: 30px;
  }
}
</style>
